﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Model
{   
    [Serializable]
    public sealed class CheckListProject
    {
        private List<HazopTeam> _hazardTeamList = new List<HazopTeam>();
        private List<string> _psiList = new List<string>();
        private List<PID> _pidList = new List<PID>();
        private NewProjectDetails _projectDetails = new NewProjectDetails();
        private List<CheckListItem> _fList = new List<CheckListItem>();
        private List<CheckListItem> _pList = new List<CheckListItem>();
        private List<CheckListItem> _iList = new List<CheckListItem>();
        private static CheckListProject _Project = null;
        private static object _syncObj = new object();

        private CheckListProject() { }
        public  static CheckListProject CheckListProjectInstance
        {
            get{
                if (_Project == null)
                {
                    lock (_syncObj){
                        if (_Project == null)
                        {
                            _Project = new CheckListProject();
                        }
                    }
                }
                return _Project;
            }
        }

        public List<HazopTeam> HazardTeamList{
            get { return _hazardTeamList; }
            set { _hazardTeamList = value; }
        }

        public List<string> PsiList{
            get { return _psiList; }
            set { _psiList = value; }
        }

        public List<PID> PidList{
            get { return _pidList; }
            set { _pidList = value; }
        }

        public NewProjectDetails ProjectDetails{
            get { return _projectDetails; }
            set { _projectDetails = value; }
        }

        public List<CheckListItem> FList{
            get { return _fList; }
            set { _fList = value; }
        }

        public List<CheckListItem> PList{
            get { return _pList; }
            set { _pList = value; }
        }

        public List<CheckListItem> IList{
            get { return _iList; }
            set { _iList = value; }
        }
    }
}
